# -*- encoding:utf8 -*-
from django.db import models

# Create your models here.
class Man(models.Model):
    '用户'
    name = models.CharField(max_length=100, blank=True)
    # 记录用户属于别人的哪些组中
    in_groups=models.CharField(max_length=500, blank=True)


class Record(models.Model):
    '用户手动记录一些信息，例如某人的生日等'
    owner = models.ForeignKey(Man, blank=True,null=True)
    name = models.CharField(max_length=100, blank=True)
    birthday = models.DateField(blank=True)
    groups=models.CharField(max_length=500, blank=True)
    detail = models.TextField(blank=True)


class HasGroup(models.Model):
    '用户手动产生的分组'
    owner=models.ForeignKey(Man, blank=True)
    # 该分组包含你哪些人
    mans=models.TextField(blank=True)